package org.core.tliaswebmanagement.aop;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Slf4j
@Component
//@Aspect
public class MyAspect2 {
    /*
    *界面类执行顺序：默认按方法字母排序，也可用@Order定义执行顺序
     */
    @Pointcut("execution(* org.core.tliaswebmanagement.service.impl.*.*(..))")
    public void pt(){}
    //前置通知
    @Before("pt()")
    public void before(){
        log.info("MyAspect2 -> before ...");
    }

    //后置通知
    @After("pt()")
    public void after(){
        log.info("MyAspect2 -> after ...");
    }
}
